<extend name="Org/base"/>
<block name="main">
	<section class="section main">
		<div class="clearfix con-main" id="mainContainer">
			<div class="con-left">
				<div class="panel">
					<div class="panel-header">
						<h3 class="panel-title bbs-title">{$bbs.name}</h3>
					</div>
					<div class="panel-body">
						<div class="bbs-info">
							<a class="photo bbs-photo" href="//bbs.wooo.wang/{$bbs.id}"><img src="//img.wooo.wang/{$bbs.avatar}"></a>
							<p><strong>{:formatCount($bbs['visit'])}</strong> 浏览 • <strong>{$bbs.gx}</strong> 贡献度</p>
							<p>{$bbs.desc|default='我好像什么都没写...'}</p>
							<p class="handle"><if condition="UID"><a id="donationBtn" class="handle-donation" href="javascript:void(0)">打赏</a><else/><a class="handle-donation" href="javascript:alert('您需要先登录账号')">打赏</a></if></p>
						</div>
					</div>
				</div>
				<div class="panel" id="siderBox">
					<ul class="switch-section">
						<li><a href="{:U('/org/'.$bbs['id'])}"><span class="icon-road"></span> 团体展示</a></li>
						<li><a href="{:U('/manage/'.$bbs['id'])}"><span class="icon-hammer"></span> 团体管理</a></li>
						<li><a href="{:U('/review/'.$bbs['id'])}"><span class="icon-eye"></span> 审阅列表</a></li>
						<li><a href="{:U('/log/'.$bbs['id'])}"><span class="icon-docu"></span> 贡献日志</a></li>
						<li><a href="{:U('/apply/'.$bbs['id'])}"><span class="icon-yj"></span> 申请记录</a></li>
						<li><a href="{:U('/createDoc/'.$bbs['id'])}"><span class="icon-add"></span> 添加文档</a></li>
						<li><a href="{:U('/set/'.$bbs['id'])}" class="red"><span class="icon-setting"></span> 设置社区</a></li>
					</ul>
				</div>
			</div>
			<div class="con-right">
				<div class="panel other">
					<div class="panel-header">
						<h1 class="topic-title">设置社区<span class="icon-sum" id="toggleBtn" onclick="$('#mainContainer').toggleClass('toggle-side-mark');"></span></h1>
						<p class="topic-info">
							<a href="//bbs.wooo.wang/{$bbs['id']}">{$bbs['name']}</a> • 设置社区的相关信息（如：头像、名字、简介等）。
						</p>
					</div>
					<div class="panel-body">
						<form action="{:U('/set/'.$bbs['id'])}" class="setBook create form" method="POST">
							<div class="form-item">
								<input type="text" name="name" id="name" spellcheck="false" placeholder="社区名称" value="{$bbs.name}">
								<p></p>
							</div>
							<div class="form-item">
								<textarea name="desc" id="desc" spellcheck="false" placeholder="社区简介...">{$bbs.desc}</textarea>
								<p></p>
							</div>
							<div class="form-item">
								<input type="hidden" name="cateid" id="cateInput" value="{$bbs.class}">
								<span>请选择社区所属分类：</span>
								<div class="cate-list" id="cates">
									{$cate}
									<p class="no-cate-msg">注：社区依属于分类而存在，请为您的社区选择一个最合适、最贴切的分类！</p>
								</div>
								<p class="cate-msg"></p>
							</div>
							<div class="form-item">
								<button class="create-btn" id="setOrgBtn">确 认</button>
							</div>
						</form>
					</div>
				</div>
				<div class="panel">
					<div class="panel-header">
						<h3 class="panel-title bbs-title">设置社区头像</h3>
					</div>
					<div class="panel-body">
						<form class="setBook form">
							<div class="form-item">
								<div id="setBookImg" data-token="{$token|default=''}">
									<img src="//img.wooo.wang/{$bbs.avatar}" title="设置社区头像">
									<p style="text-align:center;">点击修改头像（图片宽高比例为1:1）</p>
								</div>
								<p></p>
							</div>
						</form>
					</div>
				</div>
				<div class="panel">
					<div class="panel-header">
						<h3 class="panel-title bbs-title">设置社区话题分类</h3>
					</div>
					<div class="panel-body">
						<form class="setBook form">
							<div class="form-item">
								<div class="cate-list">
									<ul id="bar" class="bbs-cate-move clearfix">
										<volist name="bbs['cateData']" id="vo">
											<li data-cid="{$key}">{$vo}<i class="icon-no"></i></li>
										</volist>
									</ul>
									<a href="javascript:void(0)" class="add-bbs-cate"><span class="icon-plus"></span></a>
									<br>
									<p class="no-cate-msg">注：双击可修改分类名称！</p>
								</div>
							</div>
							<div class="form-item">
								<button class="create-btn" id="setBbsCate">确 认</button>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</section>
</block>
<block name="js">
	<script src="__STATIC__/common/js/qiniu/plupload.full.min.js?v=__VERSION__"></script>
	<script src="__STATIC__/common/js/qiniu/qiniu.js?v=__VERSION__"></script>
	<script src="__STATIC__/common/js/Sortable.js?v=__VERSION__"></script>
	<script>
        var bid = "{$bbs.id}", max = "{$bbs.catecount}";
	</script>
	<script src="__STATIC__/doc/js/setOrg.js?v=__VERSION__"></script>
</block>